package cn.ld.fj.web.food;

import cn.ld.fj.service.food.FoodTypeManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by zuohao on 2017/8/3.
 */

@Controller
@RequestMapping("foodTypeController")
public class FoodTypeController {

    @Autowired
    private FoodTypeManager foodTypeManager;

    @RequestMapping("getFoodTypeList")
    @ResponseBody
    public Map<String,Object> getFoodTypeList(){
        Map<String,Object> resultMap=new HashMap<>();
        resultMap.put("foodTypeList",foodTypeManager.getFoodTypeList());
        return resultMap;
    }
}
